

void UI_ArcTangentialOptions::destroy() {
    PF_SETTINGS->beginGroup("/Draw");
    PF_SETTINGS->writeEntry("/ArcTangentialRadius", leRadius->text());    
    PF_SETTINGS->endGroup();
}

void UI_ArcTangentialOptions::setAction(PF_ActionInterface* a, bool update) {
    if (a!=NULL && a->rtti()==LX_Define::ActionDrawArcTangential) {
        action = (WF_DrawArcTangential*)a;

        QString sr;
        if (update) {
            sr = QString("%1").arg(action->getRadius());
        } else {
            PF_SETTINGS->beginGroup("/Draw");
            sr = PF_SETTINGS->readEntry("/ArcTangentialRadius", "1.0");
            PF_SETTINGS->endGroup();
            action->setRadius(sr.toDouble());
        }
        leRadius->setText(sr);
    } else {
        PF_DEBUG->print(PF_Debug::D_ERROR, 
			"QG_ArcTangentialOptions::setAction: wrong action type");
        action = NULL;
    }

}


/*void QG_ArcTangentialOptions::init() {
    data = NULL;
    PF_SETTINGS->beginGroup("/Draw");
    bool reversed = PF_SETTINGS->readNumEntry("/ArcReversed", 0);
    PF_SETTINGS->endGroup();
    
    rbNeg->setChecked(reversed);
}*/



/*void QG_ArcTangentialOptions::setData(PF_ArcData* d) {
    data = d;
    updateDirection(false);
}*/

void UI_ArcTangentialOptions::updateRadius(const QString& s) {
    if (action!=NULL) {
        action->setRadius(PF_Math::eval(s));
    }
}
